<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>专家咨询订单管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/expertorder/expertConsultationOrder/">专家咨询订单列表</a></li>
    <%--<shiro:hasPermission name="expertorder:expertConsultationOrder:edit"><li><a href="${ctx}/expertorder/expertConsultationOrder/form">专家咨询订单添加</a></li></shiro:hasPermission>--%>
</ul>
<form:form id="searchForm" modelAttribute="expertConsultationOrder"
           action="${ctx}/expertorder/expertConsultationOrder/" method="post"
           class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <ul class="ul-form">
        <li><label>咨询人：</label>
            <form:input path="user.name" htmlEscape="false" maxlength="20" class="input-medium"/>
        </li>
        <li><label>专家：</label>
            <form:input path="expert.name" htmlEscape="false" maxlength="20" class="input-medium"/>
        </li>
        <li><label>订单状态：</label>
            <select name="orderStatus" class="input-medium">
                <option value="">全部</option>
                <option value="INIT">未付款</option>
                <option value="ONGOING">正在进行</option>
                <option value="CLOSE">结束</option>
            </select>
        </li>
        <li><label>开始时间：</label>
            <input name="createDate" type="text" readonly="readonly" maxlength="20"
                   class="input-medium Wdate"
                   value="<fmt:formatDate value="${createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>"
                   onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
        </li>
        <li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
        </li>
        <li class="clearfix"></li>
    </ul>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <%--<th>支付渠道</th>--%>
    <th>咨询单号</th>
    <th>专家</th>
    <th>咨询人</th>
    <th>咨询费用</th>
    <th>订单状态</th>
    <th>开始时间</th>
    <th>支付成功时间</th>
    <%--<th>费用设置</th>--%>
    <%--<th>备注</th>--%>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="expertConsultationOrder">
        <tr>
                <%--<td>
                    <a href="${ctx}/expertorder/expertConsultationOrder/form?id=${expertConsultationOrder.id}">
                            ${expertConsultationOrder.paymentChannel}
                    </a></td>--%>
            <td>
                    ${expertConsultationOrder.paymentTradeNo}
            </td>
            <td>
                    ${expertConsultationOrder.expert.name}
            </td>
            <td>
                    ${expertConsultationOrder.user.name}
            </td>
                <%--<th onclick="loadPop(${expertConsultationOrder.user.id},${expertConsultationOrder.expert.id})">--%>
            <td>
                    ${expertConsultationOrder.orderPrice}
            </td>
            <td>
                <c:choose>
                    <c:when test="${expertConsultationOrder.orderStatus=='INIT'}">
                        未付款
                    </c:when>
                    <c:when test="${expertConsultationOrder.orderStatus=='ONGOING'}">
                        正在进行
                    </c:when>
                    <c:otherwise>
                        结束
                    </c:otherwise>
                </c:choose>
            </td>
            <td>
                <fmt:formatDate value="${expertConsultationOrder.createDate}"
                                pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
            <td>
                <fmt:formatDate value="${expertConsultationOrder.paymentSuccessDate}"
                                pattern="yyyy-MM-dd HH:mm:ss"/>
            </td>
                <%--<td>
                        ${expertConsultationOrder.remarks}
                </td>--%>
                <%--<td>
                    <a href="#"
                       onclick="loadPop(${expertConsultationOrder.user.id},${expertConsultationOrder.expert.id})">费用设置</a>
                </td>--%>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>